package com.visitor.demo2.impl;

import com.visitor.demo2.GraphicVisitor;
import com.visitor.demo2.MyGraphic;

//MyRectangle.java 矩形类
public class MyRectangle extends MyGraphic
{
    public float width;
    public float height;

    public MyRectangle()
    {
        super();
        width = 1;
        height = 1;
    }

    public MyRectangle(float centerPointX, float centerPointY, float width, float height, float angle)
    {
        super("Rectangle", centerPointX, centerPointY, angle);
        this.width = width;
        this.height = height;
    }

    public void accept(GraphicVisitor v)
    {
        v.visit(this);
    }
}
